﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace F1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入你要计算的图形：1.圆形 2.正方形");
            int a = int.Parse(Console.ReadLine());
            switch (a)
            {
                case 1:
                    Console.WriteLine("请输入圆的半径：");
                    int b = int.Parse(Console.ReadLine());
                    Circle cir = new Circle(b);
                    Program.shape(cir);
                    break;
                case 2:
                    Console.WriteLine("请输入正方形的边长");
                    int c = int.Parse(Console.ReadLine());
                    Square squ = new Square(c);
                    Program.shape(squ);
                    break;
                default:
                    break;
            }
        }
        public static void shape(Shape a)
        {
            a.GetArea();
        }
    }
}
